<?php
Core::inc('modules/area/area.class.php');
Core::inc('modules/separator/separator.class.php');

function rpc_separator_create()
{
	$area = Url::getVar('area');
	
	if ($area === null) {
		Event::log('modules.separator', 'Can\'t create new article, no areaID given', Event::LOG_ERROR);
	}
	
	$sep = Separator::create($area);
	
	Ajax::$data['success'] = true;
	Ajax::$data['id'] = $sep['id'];
	Ajax::$data['html'] = Separator::makeObj($sep)->showBuffered();
}

function rpc_separator_delete()
{
	$id = Url::getVar('id');
	
	if ($id === null) {
		Event::log('modules.separator', 'Can\'t delete, no ID given', Event::LOG_ERROR);
	}
	
	Separator::delete($id);
	
	Ajax::$data['success'] = true;
}
?>